package com.chaoyi.util;;

public class PageUtil {

	public static int getOffset(int pageNumber,int pageSize){
		return (pageNumber-1)*pageSize;
	}
	
	public static int getTotalPages(int pageSize,int totalRecords){
		return (int)Math.ceil((double)totalRecords/(double)pageSize);
	}
}
